# lottery ticket

nums = list(map(int, input().split()))
snum = set(nums)

n = int(input())

for i in range(n):
    lt = list(map(int, input().split()))
    slt = set(lt)
    mvn = snum & slt
    if len(mvn) >= 3:
        print("Lucky")
    else:
        print("Unlucky")

# empty string
